package com.gs.core.aop.examples;

import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.AfterReturning;
import org.aspectj.lang.annotation.AfterThrowing;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.stereotype.Component;

import com.gs.core.domain.User;

@Component
@Aspect
public class AfterThrowingExample {
	//any void method
	@AfterThrowing(" (execution(* com.gs..*Service.*(..))) ")
	public void voidMethodChecks(JoinPoint jp){
        String msg = "DO @AfterThrowing voidMethodChecks " + jp.getSignature().getName();
        System.out.println(msg);
	}
}
